package com.zpf.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
/*
* 环绕通知：
*       先执行环绕通知
*       再执行核心service中的业务zsgc方法
*       再执行环绕通知 例如环绕通知
*
* */
public class MyAroundAdvice implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("======环绕通知：开启事务MethodInterceptor======");
        methodInvocation.proceed();//调用执行核心service中的业务方法
        System.out.println("======环绕通知：开启事务MethodInterceptor======");
        return null;
    }
}
